<?php
namespace Amis\form;
class ChartRadios extends FormItem
{
    public string $type = 'chart-radios';

    /**
     * echart 图表配置
     * @param $config
     * @return $this
     */
    public function config($config)
    {
        $this->config = $config;
        return $this;
    }

    /**
     * 高亮的时候是否显示 tooltip
     * @param bool $showTooltipOnHighlight
     * @return $this
     */
    public function showTooltipOnHighlight(bool $showTooltipOnHighlight = false)
    {
        $this->showTooltipOnHighlight = $showTooltipOnHighlight;
        return $this;
    }

    /**
     * 图表数值字段名
     * @param string $chartValueField
     * @return $this
     */
    public function chartValueField(string $chartValueField = 'value')
    {
        $this->chartValueField = $chartValueField;
        return $this;
    }
}